from abc import abstractmethod, ABCMeta


class ExceptionHandler(object):
    __metaclass__ = ABCMeta

    @abstractmethod
    def handler(self, exception, sock_puppet, spider_module):
        pass


class DefaultExceptionHandler(ExceptionHandler):
    def handler(self, exception, sock_puppet, spider_module):
        raise exception